<!doctype HTML public "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Click to Convert 5.2: Anything to HTML -->
<!-- http://www.clicktoconvert.com -->

<html>
<head>
<title>gravityboxscheduleuserguide - page 151 of 234</title>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta name="Generator" content="Click to Convert">

<!--Start of page styles-->
<STYLE TYPE="text/css">
<!--
 /* Foreground Image Styles */

 /* Position Styles */
 .ts151p0{position:absolute;left:106px;top:97px;}
 .ts151p1{position:absolute;left:352px;top:97px;}
 .ts151p3{position:absolute;left:665px;top:97px;}
 .ts151p7{position:absolute;left:106px;top:113px;}
 .ts151p8{position:absolute;left:706px;top:1026px;}
 .ts151p9{position:absolute;left:331px;top:1044px;}
 .ts151p13{position:absolute;left:106px;top:146px;}
 .ts151p15{position:absolute;left:106px;top:220px;}
 .ts151p17{position:absolute;left:106px;top:256px;}
 .ts151p18{position:absolute;left:106px;top:275px;}
 .ts151p19{position:absolute;left:106px;top:293px;}
 .ts151p20{position:absolute;left:106px;top:312px;}
 .ts151p22{position:absolute;left:106px;top:330px;}
 .ts151p23{position:absolute;left:106px;top:348px;}
 .ts151p24{position:absolute;left:106px;top:367px;}
 .ts151p26{position:absolute;left:106px;top:385px;}
 .ts151p29{position:absolute;left:106px;top:404px;}
 .ts151p30{position:absolute;left:106px;top:422px;}
 .ts151p33{position:absolute;left:106px;top:440px;}
 .ts151p34{position:absolute;left:106px;top:460px;}
 .ts151p36{position:absolute;left:106px;top:478px;}
 .ts151p37{position:absolute;left:106px;top:496px;}
 .ts151p39{position:absolute;left:106px;top:514px;}
 .ts151p40{position:absolute;left:106px;top:532px;}
 .ts151p42{position:absolute;left:106px;top:550px;}
 .ts151p44{position:absolute;left:106px;top:569px;}
 .ts151p46{position:absolute;left:106px;top:587px;}
 .ts151p47{position:absolute;left:106px;top:605px;}
 .ts151p49{position:absolute;left:106px;top:623px;}
 .ts151p50{position:absolute;left:106px;top:641px;}
 .ts151p52{position:absolute;left:106px;top:659px;}
 .ts151p54{position:absolute;left:106px;top:677px;}
 .ts151p56{position:absolute;left:106px;top:695px;}
 .ts151p58{position:absolute;left:106px;top:714px;}
 .ts151p59{position:absolute;left:106px;top:732px;}
 .ts151p61{position:absolute;left:106px;top:750px;}
 .ts151p63{position:absolute;left:106px;top:768px;}
 .ts151p65{position:absolute;left:106px;top:786px;}
 .ts151p68{position:absolute;left:106px;top:804px;}
 .ts151p70{position:absolute;left:106px;top:822px;}
 .ts151p71{position:absolute;left:106px;top:840px;}
 .ts151p73{position:absolute;left:106px;top:859px;}
 .ts151p75{position:absolute;left:106px;top:877px;}
 .ts151p77{position:absolute;left:106px;top:895px;}
 .ts151p79{position:absolute;left:106px;top:913px;}
 .ts151p81{position:absolute;left:106px;top:931px;}
 .ts151p82{position:absolute;left:106px;top:949px;}
 .ts151p85{position:absolute;left:106px;top:967px;}
 .ts151p87{position:absolute;left:106px;top:985px;}
 .ts151p89{position:absolute;left:552px;top:255px;}
 .ts151p91{position:absolute;left:552px;top:267px;}
 .ts151p94{position:absolute;left:552px;top:280px;}
 .ts151p96{position:absolute;left:552px;top:292px;}

 /* Font Styles */
 .ft0p151{font-style:normal;font-weight:bold;font-size:13px;font-family:arial,sans-serif;color:#000000;}
 .ft1p151{font-weight:normal;}
 .ft2p151{font-style:normal;font-weight:normal;font-size:13px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft3p151{font-style:normal;font-weight:normal;font-size:16px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft4p151{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#000000;}
 .ft5p151{font-style:normal;font-weight:normal;font-size:32px;font-family:helvetica,arial,sans-serif;color:#000000;}
 .ft6p151{font-style:normal;font-weight:bold;font-size:21px;font-family:arial,sans-serif;color:#808080;}
 .ft7p151{font-style:normal;font-weight:normal;font-size:16px;font-family:arial,sans-serif;color:#000000;}
 .ft8p151{font-style:normal;font-weight:normal;font-size:16px;font-family:"courier new",courier,monospace;color:#000000;}
 .ft9p151{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#FFFFFF;}
 .ft10p151{font-style:normal;font-weight:normal;font-size:11px;font-family:arial,sans-serif;color:#000000;}

 /* Background Style */
 .styleBackground151{position:absolute;left:97px;top:255px}

 /* Navigation Styles */
 .styleNavBarTop{position:absolute;left:0px;top:2px}
 .nb{position:absolute;left:2px;top:0px}
 .nbs{position:absolute;left:0px;top:0px}
 .nbe{position:absolute;left:836px;top:0px}
 .styleNavBarBot{position:absolute;left:0px;top:1117px}
-->
</STYLE>
<!--End of page styles-->

</head>
<body bgcolor="#ffffff" text="#000000" link="#0000FF" Vlink="#660099">

<table id="pageTable" width="836" STYLE="position: relative; left: auto; top: auto;"><tr><td>
<div class=nbs><img src="./navbarstart.gif" width="2" height="30"></div>
<div class=nb><img src="./navbar.gif" width="836" height="30" alt="Navigation bar"></div>
<div class=nbe><img src="./navbarend.gif" width="2" height="30"></div>
<div class=styleNavBarTop>
<table width="834" height="26" border="0" cellspacing="0">
  <tr align="left">
    <td width="4">&nbsp;</td>
    <td width="25" align="center"><a href="http://www.gravitybox.com" target="_parent"><img src="./home.gif" border="0" alt="Home"></a></td>
    <td width="25" align="center"><a href="#" onClick="window.open('./print.html','Printing','width=300,height=100,toolbar=no,directories=no');return false;"><img src="./print.gif" border="0" alt="Print document"></a></td>
    <td width="10" align="center"><img src="./separator.gif" border="0"></td>
    <td width="18" align="center"><a href="./index1.html"><img src="./start.gif" width="18" height="14" border="0" alt="Start"></a></td>
    <td width="18" align="center"><a href="./index150.html"><img src="./back.gif" width="14" height="14" border="0" alt="Previous page"></a></td>
    <td width="80" valign="middle"><table width="100%" height="16" border="0" cellspacing="1" bgcolor="#ACA899"><tr><td align="center" bgcolor="#ffffff"><font face=verdana,arial,sans-serif><font size="1">&nbsp;151 of 234&nbsp;</font></font></td></tr></table></td>
    <td width="18" align="center"><a href="./index152.html"><img src="./forward.gif" width="14" height="14" border="0" alt="Next page"></a></td>
    <td width="18" align="center"><a href="./index234.html"><img src="./end.gif" width="18" height="14" border="0" alt="End"></a></td>
    <td width="620">&nbsp;</td>
  </tr>
</table>
<p>
</div>
<nobr>
<div class=styleBackground151><img src="./background151.png" width="641" height="800" border="0" alt=""></div>
<div class=ts151p0><span class="ft0p151"> </span></div>
<div class=ts151p1><span class="ft0p151">Gravitybox Schedule Primer<span class="ft1p151"> </span></span></div>
<div class=ts151p3><span class="ft0p151">Page 149&nbsp; </span></div>
<div class=ts151p7><span class="ft2p151"> </span></div>
<div class=ts151p8><span class="ft3p151"> </span></div>
<div class=ts151p9><span class="ft4p151">1998&#45;2004 Gravitybox Software LLC<span class="ft3p151"> </span></span></div>
<div class=ts151p13><span class="ft5p151">Chapter 15 </span></div>
<div class=ts151p15><span class="ft6p151">OtherDrop Example </span></div>
<div class=ts151p17><span class="ft7p151">The next example is deceptively simple. It is just over 20 </span></div>
<div class=ts151p18><span class="ft7p151">lines of code but still merits the definition of an application </span></div>
<div class=ts151p19><span class="ft7p151">that performs a complicated action. There are times when </span></div>
<div class=ts151p20><span class="ft7p151">you will want to add appointments from some external source. You may not want the </span></div>
<div class=ts151p22><span class="ft7p151">user to click to add appointments at all. This example has one form with a schedule and </span></div>
<div class=ts151p23><span class="ft7p151">a list box. The list box is populated with people, clients, trucks, or whatever. You want to </span></div>
<div class=ts151p24><span class="ft7p151">drag an item from the list and have it appear on the schedule with the proper text </span></div>
<div class=ts151p26><span class="ft7p151">displayed. For this example I have hard&#45;coded the list items. You could of course load it </span></div>
<div class=ts151p29><span class="ft7p151">from anywhere, preferably your database of patients. I have three items in it. In order to </span></div>
<div class=ts151p30><span class="ft7p151">drag an item and drop it on a schedule you will need to add a little code. </span></div>
<div class=ts151p33><span class="ft7p151"> </span></div>
<div class=ts151p34><span class="ft8p151">Option Explicit </span></div>
<div class=ts151p36><span class="ft8p151"> </span></div>
<div class=ts151p37><span class="ft8p151">Private Sub Form_Load() </span></div>
<div class=ts151p39><span class="ft8p151"> </span></div>
<div class=ts151p40><span class="ft8p151">&nbsp; Call List1.AddItem(&#34;Father Time&#34;) </span></div>
<div class=ts151p42><span class="ft8p151">&nbsp; Call List1.AddItem(&#34;Jack Frost&#34;) </span></div>
<div class=ts151p44><span class="ft8p151">&nbsp; Call List1.AddItem(&#34;Mother Nature&#34;) </span></div>
<div class=ts151p46><span class="ft8p151"> </span></div>
<div class=ts151p47><span class="ft8p151">End Sub </span></div>
<div class=ts151p49><span class="ft8p151"> </span></div>
<div class=ts151p50><span class="ft8p151">Private Sub List1_MouseDown(Button As Integer, Shift As </span></div>
<div class=ts151p52><span class="ft8p151">Integer, X As Single, Y As Single) </span></div>
<div class=ts151p54><span class="ft8p151">&nbsp; Call List1.OLEDrag </span></div>
<div class=ts151p56><span class="ft8p151">End Sub </span></div>
<div class=ts151p58><span class="ft8p151"> </span></div>
<div class=ts151p59><span class="ft8p151">Private Sub List1_OLESetData(Data As DataObject, _ </span></div>
<div class=ts151p61><span class="ft8p151">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataFormat As Integer) </span></div>
<div class=ts151p63><span class="ft8p151">&nbsp; Call Data.SetData(Schedule1.CreateByteArray(&#34;90&#34;), _ </span></div>
<div class=ts151p65><span class="ft8p151">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Schedule1.OLEDragFormat) </span></div>
<div class=ts151p68><span class="ft8p151">End Sub </span></div>
<div class=ts151p70><span class="ft8p151"> </span></div>
<div class=ts151p71><span class="ft8p151">Private Sub List1_OLEStartDrag(Data As DataObject, _ </span></div>
<div class=ts151p73><span class="ft8p151">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AllowedEffects As Long) </span></div>
<div class=ts151p75><span class="ft8p151">&nbsp; Call Data.SetData(, Schedule1.OLEDragFormat) </span></div>
<div class=ts151p77><span class="ft8p151">&nbsp; AllowedEffects = vbDropEffectCopy </span></div>
<div class=ts151p79><span class="ft8p151">End Sub </span></div>
<div class=ts151p81><span class="ft8p151"> </span></div>
<div class=ts151p82><span class="ft8p151">Private Sub Schedule1_AfterAdd(ByVal NewIndex As Long) </span></div>
<div class=ts151p85><span class="ft8p151">&nbsp; Schedule1.ScheduleItems(NewIndex).DisplayText = List1.Text </span></div>
<div class=ts151p87><span class="ft8p151">End Sub </span></div>
<div class=ts151p89><span class="ft9p151">Quick Tip </span></div>
<div class=ts151p91><span class="ft10p151">You may drop a non&#45;schedule object </span></div>
<div class=ts151p94><span class="ft10p151">on a schedule if needed to create an </span></div>
<div class=ts151p96><span class="ft10p151">appointment if necessary. </span></div>
<div class=styleNavBarBot>
<table width="836" border="0" cellspacing="2">
  <tr></tr>
  <tr>
    <td width="118"><a href="http://www.purepage.com"><img src="./smalllogo.gif" width="118" height="46" border="0" alt="http://www.purepage.com"></a></td>
    <td></td>
  </tr>
</table>
</div>

</td></tr></table>

</body>
</html>
